Comm = {

    //URL service
    BASE_SERVICE_URL: "http://localhost/LinhKienMayTinh.Coding/Service/LinhKienMayTinhService.asmx/",

    //Paremeter truyen len service
    requestData: null,

    //Data tra ve khi goi len service
    responseData: null,

    /**
    * Function ket noi voi service<br>
    * Date 2013.01.14<br>
    *
    * @author Tien-HV
    * @version 1.0
    */
    httpConnect: function (vurl, sucessCallback, errorCallback) {
        try {
            $.ajax({
                type: "POST",
                url: vurl,
                data: Comm.requestData,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (response) {
                    Comm.responseData = response.d;
                    sucessCallback();
                },
                failure: function (msg) {
                    console.log("error: " + msg);
                    errorCallback();
                }
            });
        }
        catch (err) {
            errorCallback();
        }
    }
}